#include <SoftwareSerial.h>

const int LEDGREEN = 3;
const int LEDRED = 13; 

SoftwareSerial mySerial(7,6); // RX, TX

int inByte = 0;
 
void setup()
{
  //Open the serial port
  Serial.begin(9600); 
  mySerial.begin(9600);
  
  //Set the digital pin as output
  pinMode(LEDRED, OUTPUT); 
  pinMode(LEDGREEN, OUTPUT);
}
 
void loop(){
 
    if(Serial.available() > 0)
    {
        inByte = Serial.read(); //read the incoming byte
        digitalWrite(LEDGREEN, HIGH);
        digitalWrite(LEDRED, LOW);
        mySerial.write(inByte);
      }
     if(mySerial.available() > 0)
     {
 
        inByte = mySerial.read(); //read the incoming byte
        digitalWrite(LEDGREEN, LOW);
        digitalWrite(LEDRED, HIGH);
        Serial.write(inByte);
     }                  
}
